package com.defysoft.waukids;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class Sqlite_OpenHelper extends SQLiteOpenHelper{
	String sql;
	public Sqlite_OpenHelper(Context context, String name,
			CursorFactory factory, int version) {
		super(context, name, factory, version);
	
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		sql = "create table Notice_Check(" +
				"PK_Code int, Stu_Code int)";
		db.execSQL(sql);
		sql = "create table Notice_Stamp(" +
				"PK_Code int, Stu_Code int)";
		db.execSQL(sql);
		sql = "create table Diary_Check(" +
				"PK_Code int, Stu_Code int)";
		db.execSQL(sql);
		sql = "create table Photo_Check(" +
				"PK_Code int, Stu_Code int)";
		db.execSQL(sql);
		sql = "create table Photo_Stamp(" +
				"PK_Code int, Stu_Code int)";
		db.execSQL(sql);
		sql = "create table New_Notice_Check(" +
				"Notice_Code int," +
				"Diary_Code int," +
				"Photo_Code int," +
				"Mas_Code int," +
				"Cal_Code int," +
				"Stu_Code int)";
		db.execSQL(sql);
		sql = "create table Error_Log_Check("+
				"Log_Date varchar(200),"+
				"Log_Sub varchar(200),"+
				"Log_Api int,"+
				"Log_Where varchar(200),"+
				"Log_Email varchar(200) )";
		db.execSQL(sql);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		
		
	}

}
